<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1" errorPage="error.jsp" %>
<%@include file="noentry.jsp"%>
<html>
<head>
<title>MetacubeGranth </title>
<link rel="stylesheet" type="text/css" href="css/jquery.autocomplete.css" />
	<script src="http://www.google.com/jsapi"></script>  
	<script>google.load("jquery", "1");</script>
<script src="js/jquery.autocomplete.js"></script>  
<link rel="stylesheet" type="text/css" href="css/ddsmoothmenu.css" />
<script type="text/javascript" src="js/ddsmoothmenu.js"></script>
<script type="text/javascript" src="js/validate.js"></script>
<script type="text/javascript">
	ddsmoothmenu.init({
		mainmenuid : "smoothmenu1", 
		orientation : 'h', 
		classname : 'ddsmoothmenu',
		contentsource : "markup" 
	})
</script>
<style type="text/css">
<!--
body {
	background-color: #CCCCCC;
	margin: 0px;
}
-->
</style>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="css/css.css" type="text/css" media="screen" />

</head>

<body>
	<div class="container" align="center">
		<div class="wrapper">

			<!-- template header.html -->


			<div id="roof">

				<div id="logo">
					<a href="home.jsp"> <img src="images/logo.jpg"
						title="back to home page" alt="Meta granth logo" /> </a>
				</div>
				<div id="smoothmenu1" class="ddsmoothmenu" align="left">
					<ul>
						<%
							if (session.getAttribute("userType") != null
									&& session.getAttribute("userType").toString().equals("1")) {
						%>
						<li><a href="#"> <img src="images/down.gif" />&nbsp;Admin
						</a>
							<ul>
								<li><a href="adminhome.jsp">Approve Answer</a>
								</li>
							</ul>
						</li>
						<%
							}
						%>
						<li><a href="home.jsp">Home</a>
						</li>
						<li><a href="aboutus.jsp">About</a></li>
						<li><a href="#"> <img src="images/down.gif" />&nbsp;<%out.print(session.getAttribute("userName"));
 %>
						</a>
							<ul>
								<li><a href="profile.do">Profile</a>
								</li>
								<li><a href="changePassword.jsp">Setting</a>
								</li>
								<li><a href="logout.do">Logout</a>
								</li>
							</ul>
						</li>
					</ul>
					<br style="clear: left" />
				</div>
				<div id="nav">
					<a id="nav_questions" href="allquestions.do">Questions</a><a
						id="nav_tags" href="tags.jsp">Tags</a><a id="nav_unanswered"
						href="unansweredquestion.do"> Unanswered</a><a id="nav_tags"
						href="editQuestions.do">Edit Question</a> <a id="nav_ask"
						href="askquestion.jsp" class="special">Ask a Question</a>
				</div>
			</div>

			<div class="clear"></div>

			<div id="searchBar">
				<form action="searchQuestion.do" method="post">

					<div>
						<input type="text" class="searchInput" value="<%if(request.getAttribute("questionValue")!=null){out.println(request.getAttribute("questionValue"));} %>"
							name="searchByQuestion" placeholder="Search By Question"
							id="searchByQuestion" />
							<script>
									$("#searchByQuestion").autocomplete("getQuestionTitle.jsp");</script>
							 <input type="text" class="searchInput" value="<%if(request.getAttribute("tagValue")!=null){out.println(request.getAttribute("tagValue"));} %>"
							name="searchByTag" placeholder="Search By Tag" id="searchByTag" />
							<script>
									$("#searchByTag").autocomplete("getTagData.jsp");</script>
						<input type="submit" name="Submit" value="Search"
							class="searchBtn" />
							
					<% if(request.getAttribute("errmsg")!=null){ %>
					<div align="center" style="text-align: center; background-color: #B6C4E2; padding: 3px 0 0; width: 990px; height:20px;display:block;font-size: 14px;color:red">
					<%=request.getAttribute("errmsg")%>
					</div>
					<%} %>
					</div>
				</form>
			</div>
		</div>
		<div class="wrapper">